
/* GENERATED CODE:
 *  Any modifications you make are guaranteed
 *  to be deleted when this is regenerated.
 * Please edit "PROTOCOLS" inside this directory
 *
 * Names are all upper case because of "String" and "string."
 */

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using OWED.Network.Messages.General;
using OWED.Network.Messages;
using OWED.Network.Messages.Reply;


namespace OWED.Network.Messages.General
{
	public class ProposalID: IProtocolItem 
	{
		int my_number;
		public ProposalID (int number)
		{
			my_number = number;
		}
		public int number { get { return my_number; } }


		public static new ProposalID FromXml(XmlDocument xml)
		{
			int number = int.Parse(xml.SelectSingleNode("ProposalID").Attributes.GetNamedItem("number").Value);
			return new ProposalID(number);
		}


		public override XmlDocument ToXml()		{
			XmlDocument doc = new XmlDocument();

			doc.AppendChild(doc.CreateElement("ProposalID"));
			XmlAttribute attr;
			attr = doc.CreateAttribute("number");
			attr.Value = my_number.ToString();
			doc.FirstChild.Attributes.Append(attr);


			return doc;
		}
	}
}
